package br.com.wepa.webapps.orca.logica.persistencia;

import br.com.wepa.webapps.orca.logica.persistencia.hibernate.HibernateDAOFactory;

public abstract class DAOFactory {

    /**
     * Creates a standalone DAOFactory that returns unmanaged DAO
     * beans for use in any environment Hibernate has been configured
     * for. Uses HibernateHelper/SessionFactory and Hibernate context
     * propagation (CurrentSessionContext), thread-bound or transaction-bound,
     * and transaction scoped.
     */
    public static final Class HIBERNATE = HibernateDAOFactory.class;

    /**
     * Factory method for instantiation of concrete factories.
     */
    public static DAOFactory instance(Class factory) {
        try {
            return (DAOFactory)factory.newInstance();
        } catch (Exception ex) {
            throw new RuntimeException("Couldn't create DAOFactory: " + factory);
        }
    }
	
    /**
     * Factory method for instantiation of concrete factories.
     */

    public abstract GenericDAO getDAO(Class daoType);
    // Add your DAO interfaces here
    public abstract UsuarioDAO getUsuarioDAO();
    public abstract FornecedorDAO getFornecedorDAO();
    public abstract OrcamentoDAO getOrcamentoDAO();
    public abstract EspecificacaoprodutoDAO getEspecificacaoprodutoDAO();
    public abstract ProdutoDAO getProdutoDAO();
    public abstract CredencialDAO getCredencialDAO();
    public abstract FuncaoDAO getFuncaoDAO();
    public abstract GrupoDAO getGrupoDAO();
    public abstract SubgrupoDAO getSubgrupoDAO();
    public abstract UfDAO getUfDAO();
    public abstract ConstrutoraDAO getConstrutoraDAO();
    
    

}